package com.ky.manage.adapter;

import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.ky.manage.R;
import com.ky.manage.model.MsgCenterItemModel;

import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * 消息列表adapter
 */
public class MsgDetailAdapter extends BaseQuickAdapter<MsgCenterItemModel, BaseViewHolder> {
    private List<MsgCenterItemModel> list;

    public MsgDetailAdapter(int layoutId, List<MsgCenterItemModel> list) {
        super(layoutId, list);
        this.list = list;
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder , MsgCenterItemModel msgCenterItemModel) {
        TextView titleTv = baseViewHolder.getView(R.id.title_tv);
        TextView contentTv = baseViewHolder.getView(R.id.content_tv);
        TextView dateTv = baseViewHolder.getView(R.id.date_tv);
        titleTv.setText(msgCenterItemModel.title);
        contentTv.setText(msgCenterItemModel.content);
        dateTv.setText(msgCenterItemModel.date);
    }
}
